//
//  TKFrame.h
//  EasyKit
//
//  Created by zx on 2017/12/22.
//  Copyright © 2017年 a186f13. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

typedef NS_OPTIONS(NSInteger, TKFrameAttribute) {
    TKFrameAttributeLeft = 1 << 1,
    TKFrameAttributeRight = 1 << 2,
    TKFrameAttributeTop = 1 << 3,
    TKFrameAttributeBottom = 1 << 4,
    TKFrameAttributeLeading = 1 << 5,
    TKFrameAttributeTrailing = 1 << 6,
    TKFrameAttributeWidth = 1 << 7,
    TKFrameAttributeHeight = 1 << 8,
    TKFrameAttributeCenterX = 1 << 9,
    TKFrameAttributeCenterY = 1 << 10,
    TKFrameAttributeBaseline = 1 << 11
};

@protocol TKFrameDelegate;

@interface TKFrame : NSObject

@property (nonatomic, weak) UIView *firstView; /**< <#描述#> */
@property (nonatomic, assign) TKFrameAttribute frameArrribute; /**< <#描述#> */
@property (nonatomic, assign) CGFloat offSet; /**< <#描述#> */
@property (nonatomic, weak) id<TKFrameDelegate> delegate; /**< <#描述#> */

- (TKFrame *)left;
- (TKFrame *)top;
- (TKFrame *)right;
- (TKFrame *)bottom;
- (TKFrame *)leading;
- (TKFrame *)trailing;
- (TKFrame *)width;
- (TKFrame *)height;
- (TKFrame *)centerX;
- (TKFrame *)centerY;

@end

@protocol TKFrameDelegate <NSObject>

- (TKFrame *)constraint:(TKFrame *)constraint addFrameAttribute:(TKFrameAttribute)frameAttribute;

@end
